/*
 PureMVC AS3 / Flex Demo - Slacker 
 Copyright (c) 2008 Clifford Hall <clifford.hall@puremvc.org>
 Your reuse is governed by the Creative Commons Attribution 3.0 License
 */
package mvc
{
	import org.puremvc.as3.patterns.facade.Facade;
//	import org.puremvc.as3.demos.flex.slacker.controller.StartupCommand;
	import mvc.controller.StartupCommand;
	import	org.tools.att.Att;

	public class ApplicationFacade extends 	Facade
	{
		public static const STARTUP:String = "startup";
		
		public static const ABOUT_MODE:String	= "aboutMode";
		public static const ART_MODE:String		= "artModes";
		public static const CONTACT_MODE:String	= "contactMode";

		public static const SPLASH_MODE:String	= "splashMode";
		public static const COLL_MODE:String	= "collectionMode";

		private static	function	onTrace(...args):void{Att.send('yTrace','ApplicationFacade',args);}

		public static function getInstance():ApplicationFacade
		{
//			this.parent.trc.text+='\n ApplicationFacade';
			onTrace('	ApplicationFacade.getInstance()');
			if(instance==null)instance=new ApplicationFacade();
			return instance as ApplicationFacade;
		}
		override protected function initializeController():void	{super.initializeController();	registerCommand(STARTUP, StartupCommand);}
		public function startup(app:ArtG):void
		{
			onTrace('	sendNotification	start	',STARTUP,app);
			sendNotification(STARTUP,app);
			onTrace('	sendNotification()	finish	',STARTUP,app);
		}
	}
}
